package com.xjrsoft.module.customer.erp_model.eRP_PurchaseReturnInfo.vo;

import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.xjrsoft.core.tool.utils.StringUtil;
import lombok.Data;
import com.xjrsoft.common.Enum.TransDataType;
import com.xjrsoft.common.annotation.DataTrans;
import io.swagger.annotations.ApiModel;

/**
 * 视图实体类
 *
 * @author pp
 * @since 2021-09-24
 */
@Data
@ApiModel(value = "列表ErpPurchasereturnVo对象", description = "列表ErpPurchasereturnVo对象")
public class ErpPurchasereturnListVo {

    @JsonProperty("F_Id")
    private String fId;

    @JsonProperty("F_ReturnNumber")
    private String fReturnnumber;

    @JsonProperty("F_ReturnDate")
    private String fReturndate;

    @JsonProperty("F_ChargePeople")
    private String fChargepeople;

    @JsonProperty("F_PurReceiptNumber")
    @DataTrans(dataType = TransDataType.DATA_SQL, dataCode = "localDB", sql = "	select p.F_ReceiptNumber,p.F_Id,p.F_DeliveryUnit  from erp_purchasereceipt p", savedField = "F_Id", showField = "F_ReceiptNumber", multi = false)
    private String fPurreceiptnumber;

    @JsonProperty("F_DeliveryUnit")
    @DataTrans(dataType = TransDataType.DATA_SQL, dataCode = "localDB", sql = "	select i.F_Id,F_FullName from erp_inoutunit i where i.F_UniType=1", savedField = "F_Id", showField = "F_FullName", multi = false)
    private String fDeliveryunit;

    @JsonProperty("F_TotalReturn")
    private String fTotalreturn;

    @JsonProperty("F_Description")
    private String fDescription;

    @JsonProperty("F_CreatorUserId")
    @DataTrans(dataType = TransDataType.USER, multi = false)
    private String fCreatoruserid;

    @JsonProperty("F_CreatorTime")
    private LocalDateTime fCreatortime;




    @JsonProperty("F_AuditMark")
    private  String fAuditmarkName;


    private Integer fAuditmark;
    public String getfAuditmarkName() {
        String statusName=null;
        if(!StringUtil.isEmpty(this.fAuditmark))
        {
            switch (this.fAuditmark)
            {
                case 1:statusName="待审核";break;
                case 2:statusName="已审核";break;
            }
        }
        return statusName;
    }




    @JsonProperty("F_InvalidMark")
    private String  fInvalidmarkName;

    private Integer fInvalidmark;

    public String getfInvalidmarkName() {
        String statusName=null;
        if(!StringUtil.isEmpty(this.fInvalidmark))
        {
            switch (this.fInvalidmark)
            {
                case 1:statusName="正常";break;
                case 2:statusName="作废";break;
            }
        }
        return statusName;
    }


    @JsonProperty("flowStatus")
    private String flowStatus;

    @JsonProperty("nwfSchemeinfoId")
    private String nwfSchemeinfoId;

    @JsonProperty("formId")
    private String formId;
}
